<template>
	<view>
		<u-toast ref="uToast"></u-toast>
		<u-cell-group>
			<!-- <u-cell-item title="头像" :arrow="false">
				
				<u-avatar slot="right-icon" :src="avatar" show-level level-icon="camera" :size="76"></u-avatar>
			</u-cell-item> -->
			<u-cell-item title="代理商名称" :value="info.userName" :arrow="false" bg-color="white"></u-cell-item>

			<u-cell-item title="代理商编号" :value="info.agentNo" :arrow="false" bg-color="white"></u-cell-item>
			<u-cell-item title="实名认证" :value="info.idCardNo.substring(0,5)+'********'+info.idCardNo.substring(info.idCardNo.length
							- 5)" :arrow="false" bg-color="white"></u-cell-item>
			<u-cell-item title="手机号" :value="info.mobileNo.substring(0,3)+'****'+info.mobileNo.substring(info.mobileNo.length
							- 4)" :arrow="false" bg-color="white"></u-cell-item>

			<u-cell-item class="mt-20" title="收益配置" :arrow="true" bg-color="white" @click="goCost()"></u-cell-item>
			<u-cell-item title="返现配置" :arrow="true" bg-color="white" @click="goReturn()"></u-cell-item>
		</u-cell-group>


	</view>
</template>

<script>
	import {
		uploadBaseUrl
	} from "@/config.js";
	export default {
		data() {
			return {
				info: {},
				agentPolicyCostInfo: [],
				agentActivityInfoVos: []
			};
		},
		computed: {
			avatar() {



			},


		},
		created() {

			this.getUserInfo();
		},
		methods: {
			getUserInfo() {
				this.$zx.user_api.queryMyInfo().then((data) => {
					this.info = data.agentInfoDo;
					this.agentActivityInfoVos = data.agentActivityInfo;
					this.agentPolicyCostInfo = data.agentPolicyCost;
				});
			},
			goCost() {

				this.$u.route({
					url: 'packageA/pages/main/agent/agentCostAllocationDetail',
					params: {
						"agentPolicyCostInfo": encodeURIComponent(JSON.stringify(this.agentPolicyCostInfo))
					}
				})
			},
			goReturn() {

				this.$u.route({
					url: 'packageA/pages/main/agent/agentAddReappearanceAllocationMoney',
					params: {
						"agentPolicyCostInfo": encodeURIComponent(JSON.stringify(this.agentActivityInfoVos))
					}
				})
			},
		},
	};
</script>

<style lang="scss">

</style>